<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>故障预警</title>

<link rel="stylesheet" href="scripts/bootstrap/css/bootstrap.min.css" />
<script src="scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="scripts/bootstrap/js/bootstrap.min.js"
	type="text/javascript"></script>

<script>
	$(function() {
		alert_situation(1);
		alert_log(1);
	});

	function alert_situation(currPage) {
		$.ajax({
			type : 'post',
			url : 'alerts/getAlertSituation.action',
			data : {
				currPage : currPage
			},
			dataType : 'html',
			success : function(data) {
				$("#alert_situation").html(data);
			}
		});
	}

	function alert_log(currPage) {
		$.ajax({
			type : 'post',
			url : 'alerts/getAlertLog.action',
			data : {
				currPage : currPage
			},
			dataType : 'html',
			success : function(data) {
				$("#alert_log").html(data);
			}
		});
	}
</script>
</head>

<body>
	<div class="row">
		<div class="col-md-12">
			<!--breadcrumbs start -->
			<ul class="breadcrumb">
				<li><a href="Nygl/index.jsp">能源管理系统</a></li>
				<li>能源管控</li>
				<li><a href="javascript:void(0);" onclick="alerts();">故障预警</a></li>
			</ul>

			<!-- 预警情况 -->
			<div style="width: 90%; background-color: white; margin: 50px auto;">
				<div style="height: 20px;"></div>
				<div id="alert_situation" style="width: 800px; margin: 50px auto;"></div>
				<div style="height: 20px; clear: both;"></div>
			</div>

			<!-- 预警日志  -->
			<div style="width: 90%; background-color: white; margin: 50px auto;">
				<div style="height: 20px;"></div>
				<div id="alert_log" style="width: 800px; margin: 50px auto;"></div>
				<div style="height: 20px; clear: both;"></div>
			</div>

		</div>
	</div>
</body>
</html>